//
//  Component.h
//  RenderV1
//
//  Created by 黄翔 on 2019/10/20.
//  Copyright © 2019 黄翔. All rights reserved.
//

#ifndef Component_h
#define Component_h

#include <string>
#include "GameObject.h"
#include "ReferenceCounted.h"

namespace hxe
{
class GameObject;

    class Component : public ReferenceCounted
    {
        friend class GameObject;
    public:
        virtual void start();
        virtual void update();
        virtual void destroy();

        Component(std::string name);
        virtual ~Component();
        std::string getName() const;
        
    public:
        GameObject* gameObject;
    private:
        std::string name;
        Component* next;
    };
}

#endif /* Component_h */
